//
//  rootViewController.m
//  QiuBai
//
//  Created by Pibinuo on 15/11/26.
//  Copyright © 2015年 皮比诺. All rights reserved.
//

#import "rootViewController.h"
#import "QSViewController.h"
#import "MessageViewController.h"
#import "MyViewController.h"
#import "mapViewController.h"
#import "chatViewcontroller.h"

@interface rootViewController ()

@end

@implementation rootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

    // 首页
    QSViewController * QSVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"QSVC"];
    UINavigationController * QSNC = [[UINavigationController alloc]initWithRootViewController:QSVC];
    
    [QSNC.tabBarItem setImage:[UIImage imageNamed:@"82-dogpaw"]];
    [QSNC.tabBarItem setTitle:@"抓一抓"];
    // 微博界面
    MessageViewController * Message = [[MessageViewController alloc] init];
    UINavigationController * nVC = [[UINavigationController alloc] initWithRootViewController:Message];
    [nVC.tabBarItem setTitle:@"抓一哈"];
    // 我的
    MyViewController * myVC = [[MyViewController alloc] init];
    UINavigationController * muVC = [[UINavigationController alloc] initWithRootViewController:myVC];
    [muVC.tabBarItem setTitle:@"我的"];
    
    mapViewController * mapVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"mapVC"];
    [mapVC .navigationItem setTitle:@"地图"];
    //聊天界面
    chatViewcontroller *chatVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"chatVc"];
    
    chatVC.title = @"通信";
    UINavigationController *chatNc = [[UINavigationController alloc]initWithRootViewController:chatVC];

   
       
    
    
    

    

  //  self.viewControllers = @[QSNC,nVC,muVC];

   self.viewControllers = @[QSNC,nVC,chatNc];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
